<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">所有订单</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminLogi/index')}">
        配送状态:
        <select class="form-control" name="mail_status" style="width: 140px;">
            <option value='0'>全部</option>
            <notempty name="mail_arr">
            <foreach name="mail_arr" item="vm">
                <option value='{$vm.id}' <if condition="$vm['id'] eq $mail_status" >selected</if> >{$vm.name}</option>
            </foreach>
            </notempty>
        </select> &nbsp;&nbsp;
        分类:
        <select class="form-control" name="category" style="width: 140px;">
            <option value='0'>全部</option>
            {$category_tree|default=''}
        </select> &nbsp;&nbsp;
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminLogi/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">
        <div class="table-actions">
            <a class="btn btn-info btn-sm" href="{:url('AdminLogi/add')}">添加订单</a>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminLogi/publish',array('yes'=>1))}" data-subcheck="true">发布
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminLogi/publish',array('no'=>1))}" data-subcheck="true">取消发布
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminLogi/top',array('yes'=>1))}" data-subcheck="true">确认付款
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminLogi/top',array('no'=>1))}" data-subcheck="true">取消确认付款
            </button>
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminLogi/delete')}" data-subcheck="true" data-msg="您确定删除吗？">
                {:lang('DELETE')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">编号</th>
                <th>订单标题</th>
                <th>分类</th>
                <th width="100">下单用户</th>
                <th width="100">下单时间</th>
                <th width="80">发布状态</th>
                <th width="80">付款状态</th>
                <th width="80">配送处理</th>
                <th width="80">操作</th>
            </tr>
            </thead>
            <foreach name="res" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td><b>{$vo.id}</b></td>
                    <td>{$vo.post_title}</td>
                    <td>
                        <foreach name="vo.categories" item="voo">
                            <span class="label label-default">{$voo.name}
                            </span>&nbsp;
                        </foreach>
                    </td>
                    <td>{$vo.user_nickname}</td>
                    <td>{:date('Y-m-d H:i',$vo['published_time'])}</td>
                    <td>
                        <if condition="$vo['post_status'] eq 1">发布中
                        <else />未发布>
                        </if>
                    </td>
                    <td>
                        <if condition="$vo['pay_status'] eq 1">已付款
                        <elseif condition="$vo['pay_status'] eq 2">待付款
                        <elseif condition="$vo['pay_status'] eq -1">未付款
                        </if>
                    </td>
                    <td><a data-toggle="tooltip" title="{$vo.m_name}，点击处理" href='javascript:openMapDialog("{:cmf_url('AdminLogi/express',['id'=>$vo['id']])}","{$vo.m_name}")'>{$vo.m_name}</a>
                    </td>
                    <td>
                        <a href="{:url('AdminLogi/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a href="{:url('AdminLogi/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
        </table>
        
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>

</body>
</html>